<include file="__THEME__/header" />

<script type="text/javascript" src="../Public/Js/Common.js"></script>
<link  href="../Public/group.css" rel="stylesheet" type="text/css"/>
</head>

<body>

	<div class="content">
		<!-- 内容 begin  -->
		<!-- 用户组件列表 begin -->
		<include file="__THEME__/apps" />
		<!-- 用户组件列表 end -->

		<div class="main">
			<!-- 右侧内容 begin  -->
			<div class=page_title>
				<!-- page_title begin -->
				<h2><img src="../Public/images/ico_app05.gif" />群组</h2>
				<div class="c"></div>
			</div><!-- page_title end -->
			<div class="tab-menu">
				<!-- 切换标签 begin  -->
				<div class="right mt5">
					<form method="post" action="__APP__/Index/searchTopic">
						<input type="text" class="TextH20" id="title" onFocus="this.className='Text2'" onBlur="this.className='TextH20'" size="25" name="keywords" value="{$keywords}"/>
						<input type="hidden" name="searchSubmit" value="1">
						<input type="submit" value="搜索话题"  class="btn_b"/>
					</form>
				</div>
				<ul>
					<li>
						<a href="__URL__/index/" ><span> 我的群组</span></a>
					</li>
					<li>
						<a href="__URL__/flist/"><span>好友的群组</span></a>
					</li>
					<li>
						<a href="__URL__/search" class="on"><span>全部群组</span></a>
					</li>
					<li>
						<a href="__URL__/allTopic"><span>最新话题</span></a>
					</li>
					<li>
						<a href="__URL__/issue"><span>
							<div class="ico_add">
								&nbsp;
							</div>发表话题</span></a>
					</li>
					<li>
						<a href="__URL__/add"><span>
							<div class="ico_add">
								&nbsp;
							</div>创建新群</span></a>
					</li>
				</ul>
			</div><!-- 切换标签 end  -->
			<div class="groupBox" style="margin:0">
				<div class="sidebar mt10">
					<div class="FSort">
						<div class="tit">
							搜索群：
						</div>
						<div  style="margin:5px;">
							<form action="__URL__/search" method="POST" name="subform">
								<span class="left">
									<input name="name" type="text" value="{$name}" class="TextH20"  style="width:90px;"  onblur="this.className='TextH20'" onFocus="this.className='Text2'"/>
								</span>&nbsp;<span>
									<input type="submit" class="btn_b" value="搜 索" />
								</span>
							</form>
						</div>
						<div class="btm"></div>
					</div>
					<div class="FSort">
						<div class="tit">
							分类浏览群：
						</div>
						<ul>

							<volist name="category" id="cate">

								<li <eq name="cate['a']" value="$cid"> class="on"  </eq>  >
									<a href="__URL__/search/cid/{$cate['a']}">{$cate['t']}</a>
								</li>

							</volist>
						</ul>
						<div class="btm"></div>
					</div>
				</div>
				<div class="boxL" style="width:600px;">
					<!-- 好友日志 begin  -->
					<if condition="$recomGroup">
						<div class="top_box">

							<fieldset class="bx1" onMouseOver="this.className='bx2'" onMouseOut="this.className='bx1'">
								<legend>
									推荐群组
								</legend>
								<volist name="recomGroup" id="group">
									<div>
										<span class="headpic50 mb5"><img src="__ROOT__/thumb.php?w=50&h=50&url={$group['logo']|get_photo_url}"></span>
										<br />
										<a href="__APP__/Group/index/gid/{$group['id']}">{$group['name']|msubstr=0,60}</a>
									</div>

								</volist>

							</fieldset>
						</div>
					</if>
					<ul class="search" style="padding-top:10px;">
						<volist name="grouplist['data']" id="group">
							<li class="bx1" onMouseOver="this.className='bx2'" onMouseOut="this.className='bx1'">
								<div class="left" style="width: 90px;">
									<span class="pic80"><a href="__APP__/Group/index/gid/{$group['id']}"><img src="__ROOT__/thumb.php?w=80&h=80&url={$group['logo']|get_photo_url}"/></a></span>
								</div>
								<div class="left" style="width: 430px;">
									<h3><a href="__APP__/Group/index/gid/{$group['id']}"><strong>{$group['name']}</strong></a></h3>
									<p>
										成员：{$group['membercount']}
									</p>
									<p>
										创建：{$group['ctime']|friendlyDate}
									</p>
									<p>
										类型：{$group['cid0']|getCategoryName}
									</p>
								</div>
								<div class="left rmenu" style="width: 60px;">
									<a href="__APP__/Group/index/gid/{$group['id']}">浏览该群</a>

									<php>
										$level = getLevel($uid,$group['id']);
									</php>
									<php>
										if($level===null){
									</php><a href="javascript:joingroup({$group['id']});">加入该群</a>
									<php>
										}
									</php>
									<php>
										if($level==="0"){
									</php>
									&nbsp;等待审核
									<php>
										}
									</php>
									<php>
										if($level==1 || $level==2){
									</php><a href="__APP__/Manage/index/gid/{$group['id']}">管理该群</a>
									<php>
										}
									</php>
									<php>
										if($level==3){
									</php>
									&nbsp;该群成员
									<php>
										}
									</php>

								</div>
							</li>
						</volist>

					</ul>
					<div class="page">
						{$grouplist['html']}
					</div>
				</div><!-- 好友日志 end  -->
			</div>
		</div><!-- 右侧内容 end  -->
		<div class="c"></div>
	</div><!-- 内容 end -->
	<include file="__THEME__/footer" />
</body>
</html>
